Optimal. Leaf size=133 \[ \frac{a^8 \tan ^5(c+d x)}{5 d}-\frac{2 i a^8 \tan ^4(c+d x)}{d}-\frac{10 a^8 \tan ^3(c+d x)}{d}+\frac{36 i a^8 \tan ^2(c+d x)}{d}-\frac{64 i a^9}{d (a-i a \tan (c+d x))}+\frac{129 a^8 \tan (c+d x)}{d}+\frac{192 i a^8 \log (\cos (c+d x))}{d}-192 a^8 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0816082, antiderivative size = 133, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083, Rules used = {3487, 43} \[ \frac{a^8 \tan ^5(c+d x)}{5 d}-\frac{2 i a^8 \tan ^4(c+d x)}{d}-\frac{10 a^8 \tan ^3(c+d x)}{d}+\frac{36 i a^8 \tan ^2(c+d x)}{d}-\frac{64 i a^9}{d (a-i a \tan (c+d x))}+\frac{129 a^8 \tan (c+d x)}{d}+\frac{192 i a^8 \log (\cos (c+d x))}{d}-192 a^8 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3487
Rule 43
Rubi steps
\begin{align*} \int \cos ^2(c+d x) (a+i a \tan (c+d x))^8 \, dx &=-\frac{\left (i a^3\right ) \operatorname{Subst}\left (\int \frac{(a+x)^6}{(a-x)^2} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac{\left (i a^3\right ) \operatorname{Subst}\left (\int \left (129 a^4+\frac{64 a^6}{(a-x)^2}-\frac{192 a^5}{a-x}+72 a^3 x+30 a^2 x^2+8 a x^3+x^4\right ) \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-192 a^8 x+\frac{192 i a^8 \log (\cos (c+d x))}{d}+\frac{129 a^8 \tan (c+d x)}{d}+\frac{36 i a^8 \tan ^2(c+d x)}{d}-\frac{10 a^8 \tan ^3(c+d x)}{d}-\frac{2 i a^8 \tan ^4(c+d x)}{d}+\frac{a^8 \tan ^5(c+d x)}{5 d}-\frac{64 i a^9}{d (a-i a \tan (c+d x))}\\ \end{align*}
Mathematica [B] time = 6.05142, size = 321, normalized size = 2.41 \[ \frac{\cos ^3(c+d x) (a+i a \tan (c+d x))^8 \left (-960 d x \cos (8 c) \cos ^5(c+d x)+480 i \cos (8 c) \cos ^5(c+d x) \log \left (\cos ^2(c+d x)\right )-160 i (\cos (6 c)-i \sin (6 c)) \cos (2 d x) \cos ^5(c+d x)+960 i d x \sin (8 c) \cos ^5(c+d x)+160 (\cos (6 c)-i \sin (6 c)) \sin (2 d x) \cos ^5(c+d x)+480 \sin (8 c) \cos ^5(c+d x) \log \left (\cos ^2(c+d x)\right )-4 (13 \tan (c)-50 i) (\cos (8 c)-i \sin (8 c)) \cos ^3(c+d x)+696 \sec (c) (\cos (8 c)-i \sin (8 c)) \sin (d x) \cos ^4(c+d x)-52 \sec (c) (\cos (8 c)-i \sin (8 c)) \sin (d x) \cos ^2(c+d x)+(\tan (c)-10 i) (\cos (8 c)-i \sin (8 c)) \cos (c+d x)+\sec (c) (\cos (8 c)-i \sin (8 c)) \sin (d x)\right )}{5 d (\cos (d x)+i \sin (d x))^8} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.156, size = 406, normalized size = 3.1 \begin{align*}{\frac{8\,{a}^{8}\cos \left ( dx+c \right ) \left ( \sin \left ( dx+c \right ) \right ) ^{7}}{5\,d}}-192\,{\frac{{a}^{8}c}{d}}+{\frac{34\,i{a}^{8} \left ( \sin \left ( dx+c \right ) \right ) ^{4}}{d}}+{\frac{4\,i{a}^{8} \left ( \sin \left ( dx+c \right ) \right ) ^{8}}{d \left ( \cos \left ( dx+c \right ) \right ) ^{2}}}+{\frac{28\,i{a}^{8} \left ( \sin \left ( dx+c \right ) \right ) ^{6}}{d \left ( \cos \left ( dx+c \right ) \right ) ^{2}}}+{\frac{96\,i{a}^{8} \left ( \sin \left ( dx+c \right ) \right ) ^{2}}{d}}-{\frac{4\,i{a}^{8} \left ( \cos \left ( dx+c \right ) \right ) ^{2}}{d}}-{\frac{2\,i{a}^{8} \left ( \sin \left ( dx+c \right ) \right ) ^{8}}{d \left ( \cos \left ( dx+c \right ) \right ) ^{4}}}+{\frac{192\,i{a}^{8}\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}}+{\frac{4\,i{a}^{8} \left ( \sin \left ( dx+c \right ) \right ) ^{6}}{d}}+70\,{\frac{{a}^{8} \left ( \sin \left ( dx+c \right ) \right ) ^{5}}{d\cos \left ( dx+c \right ) }}+193\,{\frac{{a}^{8}\sin \left ( dx+c \right ) \cos \left ( dx+c \right ) }{d}}-{\frac{28\,{a}^{8} \left ( \sin \left ( dx+c \right ) \right ) ^{7}}{3\,d \left ( \cos \left ( dx+c \right ) \right ) ^{3}}}+{\frac{112\,{a}^{8} \left ( \sin \left ( dx+c \right ) \right ) ^{7}}{3\,d\cos \left ( dx+c \right ) }}-192\,{a}^{8}x+{\frac{{a}^{8} \left ( \sin \left ( dx+c \right ) \right ) ^{9}}{5\,d \left ( \cos \left ( dx+c \right ) \right ) ^{5}}}-{\frac{4\,{a}^{8} \left ( \sin \left ( dx+c \right ) \right ) ^{9}}{15\,d \left ( \cos \left ( dx+c \right ) \right ) ^{3}}}+{\frac{8\,{a}^{8} \left ( \sin \left ( dx+c \right ) \right ) ^{9}}{5\,d\cos \left ( dx+c \right ) }}+{\frac{196\,{a}^{8}\cos \left ( dx+c \right ) \left ( \sin \left ( dx+c \right ) \right ) ^{5}}{5\,d}}+119\,{\frac{{a}^{8}\cos \left ( dx+c \right ) \left ( \sin \left ( dx+c \right ) \right ) ^{3}}{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.51626, size = 167, normalized size = 1.26 \begin{align*} \frac{a^{8} \tan \left (d x + c\right )^{5} - 10 i \, a^{8} \tan \left (d x + c\right )^{4} - 50 \, a^{8} \tan \left (d x + c\right )^{3} + 180 i \, a^{8} \tan \left (d x + c\right )^{2} - 960 \,{\left (d x + c\right )} a^{8} - 480 i \, a^{8} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + 645 \, a^{8} \tan \left (d x + c\right ) + \frac{320 \,{\left (a^{8} \tan \left (d x + c\right ) - i \, a^{8}\right )}}{\tan \left (d x + c\right )^{2} + 1}}{5 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.5429, size = 760, normalized size = 5.71 \begin{align*} \frac{-160 i \, a^{8} e^{\left (12 i \, d x + 12 i \, c\right )} - 800 i \, a^{8} e^{\left (10 i \, d x + 10 i \, c\right )} + 800 i \, a^{8} e^{\left (8 i \, d x + 8 i \, c\right )} + 6400 i \, a^{8} e^{\left (6 i \, d x + 6 i \, c\right )} + 9600 i \, a^{8} e^{\left (4 i \, d x + 4 i \, c\right )} + 6000 i \, a^{8} e^{\left (2 i \, d x + 2 i \, c\right )} + 1392 i \, a^{8} +{\left (960 i \, a^{8} e^{\left (10 i \, d x + 10 i \, c\right )} + 4800 i \, a^{8} e^{\left (8 i \, d x + 8 i \, c\right )} + 9600 i \, a^{8} e^{\left (6 i \, d x + 6 i \, c\right )} + 9600 i \, a^{8} e^{\left (4 i \, d x + 4 i \, c\right )} + 4800 i \, a^{8} e^{\left (2 i \, d x + 2 i \, c\right )} + 960 i \, a^{8}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )}{5 \,{\left (d e^{\left (10 i \, d x + 10 i \, c\right )} + 5 \, d e^{\left (8 i \, d x + 8 i \, c\right )} + 10 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 10 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 5 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 5.69276, size = 252, normalized size = 1.89 \begin{align*} 64 a^{8} \left (\begin{cases} - \frac{i e^{2 i d x}}{2 d} & \text{for}\: d \neq 0 \\x & \text{otherwise} \end{cases}\right ) e^{2 i c} + \frac{192 i a^{8} \log{\left (e^{2 i d x} + e^{- 2 i c} \right )}}{d} + \frac{\frac{480 i a^{8} e^{- 2 i c} e^{8 i d x}}{d} + \frac{1600 i a^{8} e^{- 4 i c} e^{6 i d x}}{d} + \frac{2080 i a^{8} e^{- 6 i c} e^{4 i d x}}{d} + \frac{1232 i a^{8} e^{- 8 i c} e^{2 i d x}}{d} + \frac{1392 i a^{8} e^{- 10 i c}}{5 d}}{e^{10 i d x} + 5 e^{- 2 i c} e^{8 i d x} + 10 e^{- 4 i c} e^{6 i d x} + 10 e^{- 6 i c} e^{4 i d x} + 5 e^{- 8 i c} e^{2 i d x} + e^{- 10 i c}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.91307, size = 408, normalized size = 3.07 \begin{align*} \frac{960 i \, a^{8} e^{\left (10 i \, d x + 10 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 4800 i \, a^{8} e^{\left (8 i \, d x + 8 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 9600 i \, a^{8} e^{\left (6 i \, d x + 6 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 9600 i \, a^{8} e^{\left (4 i \, d x + 4 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 4800 i \, a^{8} e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 160 i \, a^{8} e^{\left (12 i \, d x + 12 i \, c\right )} - 800 i \, a^{8} e^{\left (10 i \, d x + 10 i \, c\right )} + 800 i \, a^{8} e^{\left (8 i \, d x + 8 i \, c\right )} + 6400 i \, a^{8} e^{\left (6 i \, d x + 6 i \, c\right )} + 9600 i \, a^{8} e^{\left (4 i \, d x + 4 i \, c\right )} + 6000 i \, a^{8} e^{\left (2 i \, d x + 2 i \, c\right )} + 960 i \, a^{8} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 1392 i \, a^{8}}{5 \,{\left (d e^{\left (10 i \, d x + 10 i \, c\right )} + 5 \, d e^{\left (8 i \, d x + 8 i \, c\right )} + 10 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 10 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 5 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]